package com.pets.vo;

import com.alibaba.fastjson.JSONObject;

/**
 * 阿里云实名认证返回结果身份信息实体
 */
public class IdCardInfoVO {

    /**
     * 身份证地址
     */
    private String area;

    /**
     * 性别
     */
    private String sex;

    /**
     * 生日
     */
    private String birthday;

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public static IdCardInfoVO fill(JSONObject jsonObject){
        IdCardInfoVO IdCardInfoVO = new IdCardInfoVO();
        if(jsonObject.containsKey("area")){
            IdCardInfoVO.setArea(jsonObject.getString("area"));
        }
        if(jsonObject.containsKey("sex")){
            IdCardInfoVO.setSex(jsonObject.getString("sex"));
        }
        if(jsonObject.containsKey("birthday")){
            IdCardInfoVO.setBirthday(jsonObject.getString("birthday"));
        }
        return IdCardInfoVO;
    }

}
